package com.tongqin.distributed.service;

import org.apache.kafka.clients.producer.RecordMetadata;
import org.springframework.kafka.support.ProducerListener;

/**
 * @author yuantongqin
 * @date 2018/7/27 下午5:21
 */
public class KafkaProducerListener implements ProducerListener<Integer, String> {


    @Override
    public void onSuccess(String topic, Integer partition, Integer key, String value, RecordMetadata recordMetadata) {
        System.out.println("消息提供者发送消息情况成功");
    }

    @Override
    public void onError(String topic, Integer partition, Integer key, String value, Exception exception) {
        System.out.println("消息提供者发送消息情况失败");
    }
}
